package hander

import (
	"github.com/gin-gonic/gin"
	"good/api/reponse"
	"good/api/request"
	"good/internal/dao"
	"good/internal/models"
)

func UserShow(c *gin.Context) {
	req := request.Show{}
	if err := c.ShouldBind(&req); err != nil {
		reponse.ErrorRequest(c, "绑定失败")
		return
	}
	user := models.User{}
	if err := dao.UserShow(&user, req.Region); err != nil {
		reponse.ErrorRequest(c, "查询失败")
		return
	}
	reponse.SuccessRequest(c, "过滤成功", user)
}
